import java.util.Scanner;

/**
 * Created with IntelliJ IDEA.
 * Description:
 * User: ${USER}
 * Date: ${YEAR}-${MONTH}-${DAY}
 * Time: ${TIME}
 */
public class Main {
    public static void main(String[] args) {
        System.out.println("请输入一个整数》");
        Scanner scan = new Scanner(System.in);
        int input = scan.nextInt();
        while(input != 0){
            System.out.println(input % 10);
            input /= 10;
        }
    }
}